package top.happylaishop.shop.service;

import top.happylaishop.shop.dto.CurrentUserDto;
import top.happylaishop.shop.dto.UserDto;
import top.happylaishop.shop.pojo.User;
import top.happylaishop.shop.utils.resp.BaseResponse;
import top.happylaishop.shop.utils.resp.RestResponse;

public interface UserService {

    RestResponse<CurrentUserDto> login(UserDto userDto);

    BaseResponse register(UserDto userDto);

    BaseResponse checkValid(String str, String type);

    BaseResponse checkAnswer(String username, String question, String answer);

    RestResponse<UserDto> updateInformation(UserDto userDto);

    BaseResponse resetPassword(String passwordOld, String passwordNew, UserDto currentUser);

    BaseResponse forgetRestPassword(String username, String passwordNew);

    String getQuestionByUsername(String username);

    User getByUsername(String username);

}
